#ifndef __SCENEWATER_H__
#define __SCENEWATER_H__

#pragma once

class COgreEngine;
class WaterMesh;

class CSceneWater : public CSceneBase, public RenderTargetListener
{
//Methods
public:
	CSceneWater(COgreEngine &Creator, const String & Name, const int pos);
	virtual ~CSceneWater(void);

	void Create(TCreatorEntities const &CreatorEntities, TCreatorNodes const &CreatorNodes, TCreatorLights const &CreatorLights, ENetConfig IsClient = e_NCNone, Vector3 &CameraStartPos = Vector3(200.0f, 150.0f, 200.0f));
	bool frameStarted(const FrameEvent& evt);

	// render target events
    void preRenderTargetUpdate(const RenderTargetEvent& evt);
    void postRenderTargetUpdate(const RenderTargetEvent& evt);

	void Detach(void);
	void Attach(void);

	void processEvents(void);

//Variables
public:
	WaterMesh *m_pWaterMesh;
	Bone *m_pLeftFoot;
	Bone *m_pRightFoot;
	InputReader *m_pInputDevice;
	ParticleSystem * m_pPluie;
	Camera * m_ReflectCam;
	Entity * m_PlaneEnt;

	Real m_LastRightFoot;
	Real m_LastLeftFoot;
	RenderTexture * m_rttTex;
	Pass *pWaterPass;

	std::vector<Vector3> m_Positions;
	Real m_TimeToIdle;
};

#endif //__SCENECUBENU_H__
